import request from '@/utils/request'

/**
 *  新增点位抽奖
 */
export function postAddLotteryApi(data) {
  return request({
    url: `/tissue/positionDraw`,
    method: 'post',
    data
  })
}

/**
 *  抽奖点位列表
 */
export function getLotteryListApi(params) {
  return request({
    url: `/tissue/positionDraw/findPage`,
    method: 'get',
    params
  })
}

/**
 *  删除抽奖点位
 */
export function deleteLotteryIdApi(id) {
  return request({
    url: `/tissue/positionDraw/${id}`,
    method: 'delete'
  })
}
/**
 *  编辑点位抽奖
 */
export function putEditLotteryApi(data) {
  return request({
    url: `/tissue/positionDraw`,
    method: 'put',
    data
  })
}

/**
 *  点击抽奖
 */
export function getLotteryApi(params) {
  return request({
    url: `/tissue/positionDraw/draw`,
    method: 'get',
    params
  })
}

/**
 *  根据区域查询点位
 * @param findByAreaId
 */
export function getFindPositionDrawApi(params) {
  return request({
    url: `/tissue/position/findPositionDraw`,
    method: 'get',
    params
  })
}
